package com.lin.utils.treenode;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/8/2.
 */
@Data
public class CategoryTreeNode {

    private Integer id;

    private String text;

    private String remark;

    private Integer pid;

    private List<CategoryTreeNode> children;

    public void addChild(CategoryTreeNode node){
        if(this.children==null){
            children=new ArrayList<CategoryTreeNode>();
            children.add(node);
        }else{
            children.add(node);
        }
    }
}
